import torch
from torchvision import transforms as T
from torchvision import datasets

# 1.定义转换操作
transformer = T.Compose([
    T.ToTensor(),
    T.Normalize((0.5,), (0.5,))
])

train_ds = datasets.FashionMNIST(root="./xiazai", train=True, transform=transformer, download=True)
test_ds = datasets.FashionMNIST(root="./xiazai", train=False, transform=transformer, download=True)